﻿
CREATE FUNCTION dbo.GetPrimeIndexColumn
	(
	@Table sysname
	)
RETURNS sysname
AS
BEGIN
DECLARE @C sysname

SELECT @C = [Column] FROM  vh_PrimeIndexColumns
WHERE ([Table] = @Table) AND ([Column] <> N'ApplicantID')

RETURN @C
END

